#include<stdio.h>
#include<string.h>
int main()
{
    char str1[50] = "Hello,";
    char str2[50] = "World!";
    char str3[50];


    int strllen = strlen(str1);
    int strllen2 = strlen(str2);

    printf("Length of str1: %d\n", strllen);
    printf("Length of str2: %d\n", strllen2);


    for(int i=0;i<strllen;i++){
        printf("第%d个字符是：%c\n",i,str1[i]);
    }

    strcpy(str3,str1);

    printf("str3 after copy: %s\n", str3);

    if(strcmp(str1, "Hello, ") == 0){
        printf("str1 and str2 are equal.\n");
    } else {
        printf("str1 and str2 are not equal.\n");
    }

    strcat(str1, str2);

    printf("str1 after concatenation: %s\n", str1); 

    return 0;
}